Skip to content

lib: remove obsolete Atomics.pause parameter - #65352

Open
Jemmy (JemmyIndex) wants to merge 1 commit into
microsoft:mainfrom
JemmyIndex:fix/atomics-pause-65339
Open

Jemmy (JemmyIndex) wants to merge 1 commit into
microsoft:mainfrom
JemmyIndex:fix/atomics-pause-65339

Conversation

@JemmyIndex

Copy link
Copy Markdown

Fixes #65339.

The current ECMAScript draft defines Atomics.pause() with no arguments, but the bundled declaration still accepts an optional number. Remove the obsolete parameter so Atomics.pause(1) reports TS2554 while Atomics.pause() continues to compile. TC39's rationale explains why the parameter was removed.

The existing esnextSharedMemory conformance case already exercises both calls. Update its type baseline and add the expected diagnostic baseline; no new test case is needed.

Validation:

  • The existing conformance case passes before the change with no diagnostics. After the declaration change, it produces TS2554 for the call with an argument. It passes again with the updated baselines.
  • The CLI repro passes for Atomics.pause() and reports TS2554 for Atomics.pause(1.5).
  • validate --all completed: build, compiler/conformance, parser, fourslash, CLI, extension, native/WASM API, lint and formatting checks passed. Its overall exit status is unsuccessful because TestSubscribeSymlinkCreate/windows and TestSubscribeSymlinkDelete/windows cannot create symlinks on this machine (A required privilege is not held by the client). Both were reproduced independently.
  • hereby tidy passed without dependency changes.

AI assistance: This patch and its validation were prepared with Codex.

Copilot AI balanced review requested due to automatic review settings November 6, 2026 05:40
@github-project-automation github-project-automation Bot moved this to Not started in PR Backlog Nov 6, 2026
@typescript-automation typescript-automation Bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Nov 6, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues were identified for the change aligning Atomics.pause with the draft’s zero-argument signature.

No open issues 🎉

What changed in this PR

Updates TypeScript’s bundled Atomics.pause declaration to match the ECMAScript draft’s zero-argument signature, addressing #65339.

Changes:

  • Removes the obsolete optional numeric parameter.
  • Updates the existing conformance baselines to preserve Atomics.pause() support and expect TS2554 for Atomics.pause(1).
File Description
tsc/​testdata/​baselines/​reference/​conformance/​esnextSharedMemory.types Updates expected types to the zero-argument signature.
tsc/​testdata/​baselines/​reference/​conformance/​esnextSharedMemory.errors.txt Adds the expected TS2554 diagnostic for an argument.
tsc/​internal/​bundled/​libs/​lib.esnext.sharedmemory.d.ts Changes the declaration to pause(): void.

Review effort: Balanced

@github-project-automation github-project-automation Bot moved this from Not started to Needs merge in PR Backlog Nov 6, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

Status: Needs merge

Development

Successfully merging this pull request may close these issues.

ESNext.SharedMemory still declares the removed Atomics.pause parameter

3 participants